<script setup>
import { ref } from "vue"

let a = 1
const b = ref(2)

const changeNum = () => {
  a++
  b.value++
}

defineExpose({
  a, b
})
</script>

<template>
  <h1>我是子组件</h1>
  <button @click="changeNum">++</button>
</template>

<style></style>
